package soen343.application;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import soen343.domain.QuizHelper;
import soen343.domain.ViewQuizTS;

public class ViewQuizCommand extends FrontCommand {

	@Override
	public void processRequest(HttpServletRequest request, HttpServletResponse response) 
		throws ServletException, IOException 
	{
		QuizHelper helper = new QuizHelper();
		helper.setQuizName( request.getParameter("QuizName") );
		ViewQuizTS.execute(helper);
		
		request.setAttribute("helper", helper);
		forward("/QuizManager.jsp", request, response);
	}

}
